﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.guide.actions {

    public class GAPause extends GuideAction {

        protected var m_currTime:Number;
        protected var m_pauseTime:Number;
        protected var m_engaged:Boolean;

        public function GAPause(){
            this.m_engaged = false;
            this.m_currTime = 0;
            this.m_pauseTime = 0;
        }
        override public function enter():void{
            this.m_currTime = 0;
        }
        override public function createFromXml(_arg1:XML):Boolean{
            var _local2:XMLList = checkAndGetElement(_arg1, "pause");
            if (!_local2){
                return (false);
            };
            this.m_pauseTime = parseInt(_local2.@duration);
            return (true);
        }
        override public function update(_arg1:Number):void{
            super.update(_arg1);
            if (this.m_currTime > this.m_pauseTime){
                removeState(this);
            } else {
                this.m_currTime = (this.m_currTime + _arg1);
            };
        }

    }
}//package Modules.guide.actions 
